#include <stdio.h>

int main(int argc, char *argv[]) {

    int m, n, a, l;
    scanf("%d %d", &m, &n);
    a = m / n;
    l = m % n;
    printf("%d %d", a, l);
    return 0;
}